{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport { genComponentStyleHook, mergeToken, PresetColors } from '../../theme/internal';\nimport capitalize from '../../_util/capitalize';\nimport { resetComponent } from '../../style';\nvar genTagStatusStyle = function genTagStatusStyle(token, status, cssVariableType) {\n  var capitalizedCssVariableType = capitalize(cssVariableType);\n  return _defineProperty({}, \"\".concat(token.componentCls, \"-\").concat(status), {\n    color: token[\"color\".concat(cssVariableType)],\n    background: token[\"color\".concat(capitalizedCssVariableType, \"Bg\")],\n    borderColor: token[\"color\".concat(capitalizedCssVariableType, \"Border\")]\n  });\n};\n// FIXME: special preset colors\nvar genTagColorStyle = function genTagColorStyle(token) {\n  return PresetColors.reduce(function (prev, colorKey) {\n    var _Object$assign;\n    var lightColor = token[\"\".concat(colorKey, \"-1\")];\n    var lightBorderColor = token[\"\".concat(colorKey, \"-3\")];\n    var darkColor = token[\"\".concat(colorKey, \"-6\")];\n    var textColor = token[\"\".concat(colorKey, \"-7\")];\n    return Object.assign(Object.assign({}, prev), (_Object$assign = {}, _defineProperty(_Object$assign, \"\".concat(token.componentCls, \"-\").concat(colorKey), {\n      color: textColor,\n      background: lightColor,\n      borderColor: lightBorderColor\n    }), _defineProperty(_Object$assign, \"\".concat(token.componentCls, \"-\").concat(colorKey, \"-inverse\"), {\n      color: token.colorTextLightSolid,\n      background: darkColor,\n      borderColor: darkColor\n    }), _Object$assign));\n  }, {});\n};\nvar genBaseStyle = function genBaseStyle(token) {\n  var _Object$assign2;\n  var paddingXXS = token.paddingXXS,\n    lineWidth = token.lineWidth,\n    tagPaddingHorizontal = token.tagPaddingHorizontal;\n  var paddingInline = tagPaddingHorizontal - lineWidth;\n  var iconMarginInline = paddingXXS - lineWidth;\n  return _defineProperty({}, token.componentCls, Object.assign(Object.assign({}, resetComponent(token)), (_Object$assign2 = {\n    display: 'inline-block',\n    height: 'auto',\n    marginInlineEnd: token.marginXS,\n    paddingInline: paddingInline,\n    fontSize: token.tagFontSize,\n    lineHeight: \"\".concat(token.tagLineHeight, \"px\"),\n    whiteSpace: 'nowrap',\n    background: token.tagDefaultBg,\n    border: \"\".concat(token.lineWidth, \"px \").concat(token.lineType, \" \").concat(token.colorBorder),\n    borderRadius: token.borderRadiusSM,\n    opacity: 1,\n    transition: \"all \".concat(token.motionDurationMid),\n    textAlign: 'start',\n    // RTL\n    '&&-rtl': {\n      direction: 'rtl'\n    },\n    '&, a, a:hover': {\n      color: token.tagDefaultColor\n    }\n  }, _defineProperty(_Object$assign2, \"\".concat(token.componentCls, \"-close-icon\"), {\n    marginInlineStart: iconMarginInline,\n    color: token.colorTextDescription,\n    fontSize: token.tagIconSize,\n    cursor: 'pointer',\n    transition: \"all \".concat(token.motionDurationMid),\n    '&:hover': {\n      color: token.colorTextHeading\n    }\n  }), _defineProperty(_Object$assign2, \"&&-has-color\", _defineProperty({\n    borderColor: 'transparent'\n  }, \"&, a, a:hover, \".concat(token.iconCls, \"-close, \").concat(token.iconCls, \"-close:hover\"), {\n    color: token.colorTextLightSolid\n  })), _defineProperty(_Object$assign2, \"&-checkable\", {\n    backgroundColor: 'transparent',\n    borderColor: 'transparent',\n    cursor: 'pointer',\n    '&:not(&-checked):hover': {\n      color: token.colorPrimary,\n      backgroundColor: token.colorFillSecondary\n    },\n    '&:active, &-checked': {\n      color: token.colorTextLightSolid\n    },\n    '&-checked': {\n      backgroundColor: token.colorPrimary,\n      '&:hover': {\n        backgroundColor: token.colorPrimaryHover\n      }\n    },\n    '&:active': {\n      backgroundColor: token.colorPrimaryActive\n    }\n  }), _defineProperty(_Object$assign2, \"&-hidden\", {\n    display: 'none'\n  }), _defineProperty(_Object$assign2, \"> \".concat(token.iconCls, \" + span, > span + \").concat(token.iconCls), {\n    marginInlineStart: paddingInline\n  }), _Object$assign2)));\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Tag', function (token) {\n  var fontSize = token.fontSize,\n    lineHeight = token.lineHeight,\n    lineWidth = token.lineWidth,\n    fontSizeIcon = token.fontSizeIcon;\n  var tagHeight = Math.round(fontSize * lineHeight);\n  var tagFontSize = token.fontSizeSM;\n  var tagLineHeight = tagHeight - lineWidth * 2;\n  var tagDefaultBg = token.colorFillAlter;\n  var tagDefaultColor = token.colorText;\n  var tagToken = mergeToken(token, {\n    tagFontSize: tagFontSize,\n    tagLineHeight: tagLineHeight,\n    tagDefaultBg: tagDefaultBg,\n    tagDefaultColor: tagDefaultColor,\n    tagIconSize: fontSizeIcon - 2 * lineWidth,\n    tagPaddingHorizontal: 8 // Fixed padding.\n  });\n\n  return [genBaseStyle(tagToken), genTagColorStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];\n});","map":{"version":3,"names":["genComponentStyleHook","mergeToken","PresetColors","capitalize","resetComponent","genTagStatusStyle","token","status","cssVariableType","capitalizedCssVariableType","componentCls","color","background","borderColor","genTagColorStyle","reduce","prev","colorKey","lightColor","lightBorderColor","darkColor","textColor","Object","assign","colorTextLightSolid","genBaseStyle","paddingXXS","lineWidth","tagPaddingHorizontal","paddingInline","iconMarginInline","display","height","marginInlineEnd","marginXS","fontSize","tagFontSize","lineHeight","tagLineHeight","whiteSpace","tagDefaultBg","border","lineType","colorBorder","borderRadius","borderRadiusSM","opacity","transition","motionDurationMid","textAlign","direction","tagDefaultColor","marginInlineStart","colorTextDescription","tagIconSize","cursor","colorTextHeading","iconCls","backgroundColor","colorPrimary","colorFillSecondary","colorPrimaryHover","colorPrimaryActive","fontSizeIcon","tagHeight","Math","round","fontSizeSM","colorFillAlter","colorText","tagToken"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/tag/style/index.js"],"sourcesContent":["import { genComponentStyleHook, mergeToken, PresetColors } from '../../theme/internal';\nimport capitalize from '../../_util/capitalize';\nimport { resetComponent } from '../../style';\nconst genTagStatusStyle = (token, status, cssVariableType) => {\n  const capitalizedCssVariableType = capitalize(cssVariableType);\n  return {\n    [`${token.componentCls}-${status}`]: {\n      color: token[`color${cssVariableType}`],\n      background: token[`color${capitalizedCssVariableType}Bg`],\n      borderColor: token[`color${capitalizedCssVariableType}Border`]\n    }\n  };\n};\n// FIXME: special preset colors\nconst genTagColorStyle = token => PresetColors.reduce((prev, colorKey) => {\n  const lightColor = token[`${colorKey}-1`];\n  const lightBorderColor = token[`${colorKey}-3`];\n  const darkColor = token[`${colorKey}-6`];\n  const textColor = token[`${colorKey}-7`];\n  return Object.assign(Object.assign({}, prev), {\n    [`${token.componentCls}-${colorKey}`]: {\n      color: textColor,\n      background: lightColor,\n      borderColor: lightBorderColor\n    },\n    [`${token.componentCls}-${colorKey}-inverse`]: {\n      color: token.colorTextLightSolid,\n      background: darkColor,\n      borderColor: darkColor\n    }\n  });\n}, {});\nconst genBaseStyle = token => {\n  const {\n    paddingXXS,\n    lineWidth,\n    tagPaddingHorizontal\n  } = token;\n  const paddingInline = tagPaddingHorizontal - lineWidth;\n  const iconMarginInline = paddingXXS - lineWidth;\n  return {\n    // Result\n    [token.componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n      display: 'inline-block',\n      height: 'auto',\n      marginInlineEnd: token.marginXS,\n      paddingInline,\n      fontSize: token.tagFontSize,\n      lineHeight: `${token.tagLineHeight}px`,\n      whiteSpace: 'nowrap',\n      background: token.tagDefaultBg,\n      border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,\n      borderRadius: token.borderRadiusSM,\n      opacity: 1,\n      transition: `all ${token.motionDurationMid}`,\n      textAlign: 'start',\n      // RTL\n      '&&-rtl': {\n        direction: 'rtl'\n      },\n      '&, a, a:hover': {\n        color: token.tagDefaultColor\n      },\n      [`${token.componentCls}-close-icon`]: {\n        marginInlineStart: iconMarginInline,\n        color: token.colorTextDescription,\n        fontSize: token.tagIconSize,\n        cursor: 'pointer',\n        transition: `all ${token.motionDurationMid}`,\n        '&:hover': {\n          color: token.colorTextHeading\n        }\n      },\n      [`&&-has-color`]: {\n        borderColor: 'transparent',\n        [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {\n          color: token.colorTextLightSolid\n        }\n      },\n      [`&-checkable`]: {\n        backgroundColor: 'transparent',\n        borderColor: 'transparent',\n        cursor: 'pointer',\n        '&:not(&-checked):hover': {\n          color: token.colorPrimary,\n          backgroundColor: token.colorFillSecondary\n        },\n        '&:active, &-checked': {\n          color: token.colorTextLightSolid\n        },\n        '&-checked': {\n          backgroundColor: token.colorPrimary,\n          '&:hover': {\n            backgroundColor: token.colorPrimaryHover\n          }\n        },\n        '&:active': {\n          backgroundColor: token.colorPrimaryActive\n        }\n      },\n      [`&-hidden`]: {\n        display: 'none'\n      },\n      // To ensure that a space will be placed between character and `Icon`.\n      [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {\n        marginInlineStart: paddingInline\n      }\n    })\n  };\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Tag', token => {\n  const {\n    fontSize,\n    lineHeight,\n    lineWidth,\n    fontSizeIcon\n  } = token;\n  const tagHeight = Math.round(fontSize * lineHeight);\n  const tagFontSize = token.fontSizeSM;\n  const tagLineHeight = tagHeight - lineWidth * 2;\n  const tagDefaultBg = token.colorFillAlter;\n  const tagDefaultColor = token.colorText;\n  const tagToken = mergeToken(token, {\n    tagFontSize,\n    tagLineHeight,\n    tagDefaultBg,\n    tagDefaultColor,\n    tagIconSize: fontSizeIcon - 2 * lineWidth,\n    tagPaddingHorizontal: 8 // Fixed padding.\n  });\n\n  return [genBaseStyle(tagToken), genTagColorStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];\n});"],"mappings":";AAAA,SAASA,qBAAqB,EAAEC,UAAU,EAAEC,YAAY,QAA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